home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Misc / InstallerNG / developer / gui / example / igui_FreeApp.c < prev    next >
C/C++ Source or Header  |  1999-10-28  |  1KB  |  61 lines

  1.  
  2. #include "includes.h"
  3. #include "installergui_data.h"
  4.  
  5. /********************************************************************
  6.  *
  7.  *  DESCRIPTION
  8.  *
  9.  *  dispose the application an related resources; note that
  10.  *  the argument can also be NULL!
  11.  *
  12.  *  IN:  application - pointer to the private application structure
  13.  *  OUT: -
  14.  *
  15.  */
  16.  
  17. /********************************************************************
  18.  *
  19.  *  STATIC
  20.  *
  21.  */
  22.  
  23. /********************************************************************
  24.  *
  25.  *  EXTERN
  26.  *
  27.  */
  28.  
  29. /********************************************************************
  30.  *
  31.  *  PUBLIC
  32.  *
  33.  */
  34.  
  35. /********************************************************************
  36.  *
  37.  *  CODE
  38.  *
  39.  */
  40.  
  41. void __asm igui_FreeApp(register __a0 APTR application)
  42. {
  43.   #ifdef DEBUG
  44.   DEBUG_MAKRO
  45.   #endif
  46.  
  47.   if (application)
  48.   {
  49.     struct Application *app = (struct Application *) application;
  50.  
  51.     // dispose the complete mui application
  52.     if (app->app_Application) { DisposeObject(app->app_Application); }
  53.  
  54.     // free the application memory itself
  55.     FreeVec(app);
  56.   }
  57.  
  58.   // close the mui library
  59.   if (MUIMasterBase) { CloseLibrary(MUIMasterBase); }
  60. }
  61.